import { getSeckillApi, getcollectApi, getdetailApi } from "@/api/index.js";
let actions = {
    async actChangeswipeData(context, params) {
        let result = await getSeckillApi(params)
        context.commit("changeswipeData", result.data)
    },
    async actChangecollectDatas(context, params) {
        context.commit("changeIsLoading", true);
        let result = await getcollectApi(params)
        if (result.data.length == 0) {
            //如果条件成立说明没有更多数据了
            context.commit("changeIsLoading", false)
        }
        context.commit("changecollectDatas", result.data)
    },
    async actChangedetailData(context, params) {
        let result = await getdetailApi(params)
        console.log( result.data);
        context.commit("changedetailData", result.data)
    },
}
export default actions